package com.sxbang.bms.service;


import com.alibaba.fastjson.JSONArray;
import com.sxbang.bms.base.BaseService;
import com.sxbang.bms.base.result.Results;
import com.sxbang.bms.dto.RoleDto;
import com.sxbang.bms.model.SysPermission;
import com.sxbang.bms.model.SysRole;

import java.util.List;

public interface PermissionService {

	 Results<SysPermission> listByPage (Integer offset,  Integer limit);

	 Results<SysPermission> listByName ( String name);

	 Results<SysPermission> listByNameAndPage ( String name,  Integer offset,  Integer limit);

	 Results<JSONArray> listAllPermission ();

	 Results<SysPermission> listByRoleId(Integer roleId);

	 Long countByName( String name);

	 Results<SysPermission> listByUserId(Long userId);

	 Results<SysPermission> getMenu(Long userId);

	 Results<SysPermission> getMenuAll();

	Results<SysPermission>  updateSysPermission(SysPermission sysPermission);

	Long countAll();

	void delete(Integer id);

	void delete(SysPermission e);

	List<SysPermission> list(Integer offset, Integer limit);
	
	List<SysPermission> findAll();

	SysPermission getSysPermissionById(Integer id);

	Results<SysPermission> save(SysPermission sysPermission);

	List<SysPermission> save(List<SysPermission> sysPermissions);

}
